cmake_minimum_required(VERSION 3.10)
project(test_dds_demo)

add_definitions(-std=c++17)

find_package(fastrtps REQUIRED)

aux_source_directory(util DIR_UTILS)

add_executable(${PROJECT_NAME}_publisher hello_world_publisher.cpp HelloWorldPubSubTypes.cxx HelloWorld.cxx)
target_link_libraries(${PROJECT_NAME}_publisher fastrtps fastcdr)

add_executable(${PROJECT_NAME}_subscriber hello_world_subscriber.cpp HelloWorldPubSubTypes.cxx HelloWorld.cxx)
target_link_libraries(${PROJECT_NAME}_subscriber fastrtps fastcdr)

add_executable(${PROJECT_NAME}_publisher_cloud hello_world_publisher_cloud.cpp CloudDataPubSubTypes.cxx CloudData.cxx ${DIR_UTILS})
target_link_libraries(${PROJECT_NAME}_publisher_cloud fastrtps fastcdr)

add_executable(${PROJECT_NAME}_subscriber_cloud hello_world_subscriber_cloud.cpp CloudDataPubSubTypes.cxx CloudData.cxx ${DIR_UTILS})
target_link_libraries(${PROJECT_NAME}_subscriber_cloud fastrtps fastcdr)
